﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using An_Im.Tool;
namespace An_Im.Tool
{
    public class Macro
    {
        public string Name { get; set; }
        public string Infomation { get; set; }
        public bool IsNative { get; set; }

        public string GetVBACode()
        {
            if (IsNative)
                return VBACreator.CreateNativeVBACode(Infomation, Name);
            else
                return VBACreator.CreateArtificialVBACode(Infomation, Name);
        }

        public Macro Copy()
        {
            var mc = new Macro();
            mc.Name = Name;mc.Infomation = Infomation;
            mc.IsNative= IsNative;
            return mc;
        }
    }
}
